package com.woniuxy.controller;

import com.github.pagehelper.PageInfo;
import com.woniuxy.entity.Registered;
import com.woniuxy.service.RegisteredService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/reigster")

public class RegisteredController {
    @Autowired
    RegisteredService registeredService;

    @GetMapping("/queryde")
    public ResponseData queryDe(){
        return registeredService.queryDe();
    }

    @PostMapping("/queryrelist")
    public ResponseData queryReList(@RequestBody PageParam<Registered> pageParam){
        return registeredService.queryReList(pageParam);
    }

    @PostMapping("/refund")
    public ResponseData reRegister(@RequestBody Registered registered){
        return registeredService.AddAndRefund(registered);
    }
}
